<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>研究资源共享平台</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <script src="../layui/layui.js"></script>
    <style>
        /*对layui中的样式进行重写*/
        .layui-tab-content {
            padding: 0;/*layui-tab-content:默认有padding: 10px;的值，因为iframe的绝对定位脱离文档流，所以会存在20px的空白空间*/
        }
        .show-frame {
            top: 50px!important;
            /*默认.layui-layout-admin .layui-body {
                top: 60px;
                bottom: 44px;
            }*/
            overflow: hidden;/*消除浏览器最右边的滚动条*/
        }
        .frame {
            position: absolute;
            padding: 10px;/*与layui-footer隔开一段距离*/
            width: 100%;
            height: 100%;
        }
    </style>

</head>
<body>

    <div class="layui-side layui-bg-black" th:fragment="lefterBar">
        <div class="layui-side-scroll">

            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <!-- 侧边导航: <ul class="layui-nav layui-nav-tree layui-nav-side"> -->
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="javascript:">资源上传</a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/uploadPaperResource}">上传论文</a></dd>
                        <dd><a th:href="@{/uploadCodeResource}">上传代码</a></dd>
                        <dd><a th:href="@{/uploadDataSetResource}">上传数据集</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="javascript:">资源查找</a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/territoryResourceSearch}">领域查找</a></dd>
                        <dd><a th:href="@{/findResource}">直接查找</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="javascript:">个人信息管理</a>
                    <dl class="layui-nav-child">
                        <dd><a th:href="@{/seePrivateInformation}">查看个人信息</a></dd>
                        <dd><a th:href="@{/modifyPrivateInformation}">修改个人信息</a></dd>
                        <dd><a th:href="@{/seeUploaded}">上传资源记录</a></dd>
                    </dl>
                </li>
            </ul>
        </div>



</div>
<script src="../layui/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;
        var $ = layui.$;
        $("[name=t1]").click(function () {
            var id = $(this).attr("id");
            var content = $(this).attr("content");
            if($("li[lay-id="+id+"]").length===0){
                element.tabAdd("empTab",{
                    title:$(this).attr("title"),
                    content:"<iframe src='"+content+"' class='frame' frameborder='0'></iframe>",
                    id:id
                })
            }
            element.tabChange('empTab',id)
        })

    });
</script>
</body>
</body>
</html>
